Skip to content

Worker Deployment Versioning#896

Merged
Sushisource merged 5 commits intomasterfrom
version-annotations
Apr 4, 2025
Merged

Worker Deployment Versioning#896
Sushisource merged 5 commits intomasterfrom
version-annotations

Conversation

@Sushisource
Copy link
Copy Markdown
Member

@Sushisource Sushisource commented Apr 3, 2025

What was changed

Added necessary bits to enable worker deployment based versioning

Note

Breaking change for lang implementers: I shuffled around the build id and legacy versioning stuff to make it compile-time mutually exclusive with this new stuff.

Why?

Feature train choo choo 🚄

Checklist

  1. Closes [Feature Request] Support New Worker Versioning API #889

  2. How was this tested:
    Added fairly straightforward integ test. The testing in core isn't so valuable except to ensure the right stuff is sent to server, which is largely true for lang as well.

  3. Any docs updates needed?

@Sushisource Sushisource requested a review from a team as a code owner April 3, 2025 23:21
Comment thread core-api/src/worker.rs Outdated
Comment thread core-api/src/worker.rs Outdated
WorkerVersioningStrategy::LegcayBuildIdBased { build_id } => {
if build_id.is_empty() {
return Err(
"Legacy build id based versioning must have a non-empty build_id"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha but I never know how to do this

Suggested change
"Legacy build id based versioning must have a non-empty build_id"
"Legacy build id-based versioning must have a non-empty build_id"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to do what?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a hyphen to join a pair of space-separated words with a third word.

Comment thread core-api/src/worker.rs Outdated
Copy link
Copy Markdown
Contributor

@dandavison dandavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks safe and uncontroversial to me, so happy to approve (but I have little context for the change being made).

Comment thread core-api/src/worker.rs
Comment on lines +515 to +519
/// Use the legacy build-id-based whole worker versioning.
LegacyBuildIdBased {
/// A Build ID to use, must be non-empty.
build_id: String,
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would support a future where this option is deleted when versioning v2 is deleted

@Sushisource Sushisource enabled auto-merge (squash) April 4, 2025 21:28
@Sushisource Sushisource merged commit 7d4c48a into master Apr 4, 2025
15 of 16 checks passed
@Sushisource Sushisource deleted the version-annotations branch April 4, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support New Worker Versioning API

3 participants